home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d22 / vlrdisk.arc / VDISK.DOC < prev    next >
Encoding:
Text File  |  1988-09-15  |  9.8 KB  |  289 lines

  1. VDISK.DOC    Version 1.0    September 1, 1988
  2.  
  3. Copyright (c) 1988 Vladimir Lanin. All rights reserved.
  4. For conditions, see license below.
  5.  
  6.  
  7.  
  8. OVERVIEW
  9.  
  10. VDISK is a collection of programs that emulate a fast disk drive in
  11. memory. The drive's size, however, is specified at run time, not boot
  12. time. As a result, unlike most RAMdisk programs, VDISK takes up only a
  13. token amount of memory until you wish to use it. To begin using a new
  14. VDISK, or to remove one currently in use, you need only run the VDISK
  15. program, not re-boot the system. As with all RAMdisks, any data on the
  16. VDISK drive disappears at power-down.
  17.  
  18.  
  19.  
  20. REQUIREMENTS
  21.  
  22. VDISK will run on any MS-DOS compatible computer running PC/MS-DOS 2.0
  23. or higher.
  24.  
  25.  
  26.  
  27. INSTALLATION
  28.  
  29. To install VDISK, add a line of the form
  30.  
  31.     DEVICE=VDISKDD.SYS
  32.  
  33. to the file CONFIG.SYS in the root directory of your boot disk. Then
  34. copy the distributed file VDISKDD.SYS to the same directory. The next
  35. time you boot up your system, the next available drive letter in your
  36. system will be a VDISK drive, initially empty. For example, if you
  37. have diskette drives A and B, and a hard disk on C, the VDISK will
  38. be on D. Putting in more than one DEVICE=VDISKDD.SYS line into
  39. CONFIG.SYS will install more than one VDISK device, using successive
  40. drive letters. Each VDISK drive takes up only 416 bytes of memory.
  41.  
  42.  
  43.  
  44. OPERATION
  45.  
  46. 1. The empty VDISK drive
  47.  
  48. When a VDISK device is empty, accessing it will produce a DOS error
  49. message, something like:
  50.  
  51.     Not ready error reading drive D
  52.     Abort, Retry, Ignore?
  53.  
  54. This is the same kind of message you get when trying to read a floppy
  55. drive with no disk inside.
  56.  
  57.  
  58. 2. Setting up a new VDISK
  59.  
  60. To set up a new VDISK, you must run VDISK.EXE, specifying the size
  61. and/or other parameters of the new VDISK. The format of this request
  62. is as follows:
  63.  
  64.     vdisk [<drive>] [v] [<SIZE>] [s<N>] [n<N>] [d<N>] [z[-]<N>] [!]
  65.  
  66. If there is insufficient memory to set up the requested VDISK, a
  67. message to that effect will be displayed, along with the <SIZE>
  68. parameter of the largest VDISK currently possible (with the other
  69. parameters unchanged). Otherwise, if there is already a VDISK in
  70. <drive>, any files on it will be lost.
  71.  
  72. The parameters' meaning is as follows:
  73.  
  74. <drive>    The drive letter of the VDISK device. By default, VDISK
  75.     assumes the last drive in your system.
  76.  
  77. v    Switches on verbose output, which gives specifics of memory
  78.     allocation process.
  79.  
  80. <SIZE>    The size in K of the data area of the new VDISK. In addition
  81.     to the data area, the VDISK needs another 96 bytes, plus space
  82.     for the disk header: boot sector, File Allocation Table (FAT),
  83.     and root directory. These, however, are not included in the
  84.     <SIZE> parameter: you just specify exactly how much space you
  85.     need for your files. To match the the data area of a 360K
  86.     floppy, specify a size of 354K.
  87.  
  88.     The default VDISK size is 160K.
  89.  
  90. s<N>    The new VDISK's sector size in bytes. Must be a power of 2,
  91.     and no less than 32. VDISK always uses 1 sector per cluster.
  92.     The default sector size is 512 bytes.
  93.  
  94. n<N>    The number of sectors in the data area of the new VDISK. This
  95.     parameter can only be specified if <SIZE> isn't. For sector
  96.     sizes less than 1K, it serves to specify the size of the data
  97.     area more precisely.
  98.  
  99. d<N>    The maximum number of entries in the root directory of the new
  100.     VDISK. Subdirectories can still be of arbitrary size. By
  101.     default, N is the number of entries that fit in two sectors.
  102.     Each entry takes up 32 bytes, so at the default sector size of
  103.     512, the default root directory takes a maximum of 32 files.
  104.  
  105. z[-]<N>    Specifies the highest address in RAM (in K) beyond which the
  106.     new VDISK will not be allocated. MS-DOS uses the area at the
  107.     very top end of the user RAM for a program loader and the
  108.     transient part of COMMAND.COM. MS-DOS allows a program (such
  109.     as VDISK.EXE) to temporarily allocate any part of this area
  110.     without error or warning. However, if the program keeps the
  111.     area beyond its termination with a Terminate and Stay Resident
  112.     call (such as done by VDISK), DOS gives a message like
  113.  
  114.         Memory allocation error
  115.         Cannot load COMMAND, system halted
  116.  
  117.     and then hangs, necessitating a re-boot. The z option makes
  118.     sure that this does not happen by not allowing VDISK to use
  119.     memory beyond the limit specified. If a '-' precedes <N>, the
  120.     limit is <top of memory> - <N>. Thus, in a system with 640K
  121.     RAM, z-15 specifies a limit of 625K.
  122.  
  123.     The default is z-15. I do not know how much the various
  124.     versions of PC/MS-DOS use (besides PC-DOS 2.0, which uses
  125.     14K), and would appreciate hearing from someone who can
  126.     experiment and find out. If for some strange reason your
  127.     non-IBM system does not support BIOS call 12H (which returns
  128.     the memory size), you should not trust the default and specify
  129.     the z value (without the -) yourself.
  130.  
  131. !    Suppresses warnings. Normally, when you try to set up a VDISK
  132.     while there is already one set up on that drive, VDISK gives
  133.     you a warning about memory fragmentation and asks you if you
  134.     want to procede. Also, if there are still files on the drive,
  135.     VDISK asks you if you really don't need them. Not responding
  136.     with 'y' to either of the two queries will abort the VDISK
  137.     program. Specifying ! on the command line suppresses both
  138.     warnings.
  139.  
  140.  
  141. 3. Removing a VDISK
  142.  
  143. To release the memory allocated to an unneeded VDISK, run VDISK.EXE
  144. with the following command format:
  145.  
  146.     vdisk [<drive>] [v] out [!]
  147.  
  148. Only the current VDISK is removed. The VDISK drive remains in place,
  149. empty. You are free to set up a new VDISK on the drive. Any files that
  150. may have been on the old VDISK are irretrievably lost.
  151.  
  152. The <drive> and v options were described in the previous section. The
  153. ! option suppresses the warning that is normally issued when there are
  154. still files on the old VDISK.
  155.  
  156. Alternatively, you can run VDISKOUT.EXE, as in:
  157.  
  158.     vdiskout [<drive>] [!]
  159.  
  160. This becomes useful when there is not enough free memory left to
  161. load the regular VDISK program.
  162.  
  163.  
  164. 4. Checking a VDISK drive's status
  165.  
  166. Running VDISK.EXE without specifying either 'out' or a new VDISK
  167. parameter will report the drive's status. Thus, the status command
  168. format is:
  169.  
  170.     vdisk [<drive>] [v]
  171.  
  172. For a description of the <drive> parameter, see the section on setting
  173. up a new vdisk. The v parameter will turn on verbose output, reporting
  174. on the VDISK's sector size, root directory length, position in memory,
  175. etc.
  176.  
  177.  
  178. 5. Parameter format
  179.  
  180. Parameters to VDISK.EXE and VDISKOUT.EXE may be given in any order.
  181.  
  182. Case is insignificant.
  183.  
  184. A '-' or a '/' may precede most parameters, but need not do so.
  185.  
  186. The <drive> parameter may include the ':', but need not do so.
  187.  
  188. Those parameters that are given in K may end in a 'k', but need not
  189. do so.
  190.  
  191. The ! parameter may be given separately, or appended to any other
  192. parameter.
  193.  
  194.  
  195. 6. ERRORLEVEL settings
  196.  
  197. On termination, the VDISK program sets ERRORLEVEL to one of the
  198. following values, which may be tested for by DOS's IF command:
  199.  
  200. 0: Operation successful, specified drive was initially empty.
  201. 1: Operation successful, specified drive initially contained a VDISK.
  202. 2: Operation unsuccessful or negative response to an 'Are you sure?' prompt.
  203. 3: Error in program parameters.
  204. 4: Internal error, should never happen.
  205.  
  206.  
  207. 7. Memory allocation
  208.  
  209. Setting up a new VDISK requires:
  210. a) a chunk of memory large enough for both the VDISK program (roughly
  211.    18K) and the disk header, and
  212. b) possibly different chunk of memory large enough for the total
  213.    specified VDISK.
  214.  
  215. The new VDISK is usually put into the program block. If this is
  216. impossible, an attempt is made to allocate a large-enough separate
  217. block. Even in this case, however, MS-DOS keeps a small area at the
  218. beginning of the program block for the lifetime of the VDISK.
  219.  
  220. Setting up a new VDISK without first explicitly removing the current
  221. VDISK by a 'vdisk out' command will usually cause memory
  222. fragmentation. This is the condition when free memory is scattered
  223. over the address space in several chunks separated from each other by
  224. allocated areas. As a result, a program that requires less than the
  225. total available memory, but all in one chunk, may not be able to run.
  226. Thus, although the condition is safe, some of your memory may in
  227. effect becomes unusable. For this reason, it is always a good practice
  228. to remove an old VDISK explicitly. In any case, the original
  229. non-fragmented state may be restored simply by removing the new VDISK.
  230.  
  231.  
  232.  
  233. BUGS
  234.  
  235. VDISK has been extensively tested under PC-DOS 2.0. It has not been
  236. tried under any other version of MS-DOS. Since the only non-documented
  237. feature it uses is freeing old TSR blocks, it should run under higher
  238. versions. In either case, I would appreciate any feedback.
  239.  
  240. VDISK currently can not use memory beyond the MS-DOS limit of 640K. If
  241. there is sufficient interest in removing this limitation, I will
  242. attempt to do so.
  243.  
  244.  
  245. GENERAL INFORMATION
  246.  
  247. IBM is a registered trademark of the International Business Machine
  248. Corporation.
  249. MS-DOS is a registered trademark of Microsoft Inc.
  250.  
  251. If you have any questions or comments about VDISK send them to me at:
  252.  
  253. USENET:
  254. <backbone>!cmcl2!csd2!lanin
  255.  
  256. INTERNET:
  257. lanin@csd2.nyu.edu
  258.  
  259. U.S. Mail:
  260. Vladimir Lanin
  261. 330 Wadsworth Ave, Apt 6F
  262. New York N.Y. 10040
  263.  
  264.  
  265.  
  266. LICENSE
  267.  
  268. Copyright (c) 1988 Vladimir Lanin. All Rights Reserved.
  269.  
  270. You are free to copy and distribute VDISK for NON-COMMERCIAL use IF:
  271.  
  272.     NO FEE IS CHARGED FOR USE, COPYING OR DISTRIBUTION,
  273.  
  274.     NEITHER PROGRAM NOR DOCUMENTATION ARE MODIFIED IN ANY WAY,
  275.  
  276.     THIS LICENSE AGREEMENT IS INCLUDED.
  277.  
  278. This program is provided AS IS without any warranty, expressed or
  279. implied.
  280.  
  281. If you find VDISK useful and convenient, a contribution of $10 would
  282. be appreciated. Send contributions to:
  283.  
  284. Vladimir Lanin
  285. 330 Wadsworth Ave, Apt 6F
  286. New York N.Y. 10040
  287.  
  288. Commercial sponsorship would be welcome.
  289.